//
//  XQHomeSecondTableViewCell.swift
//  XiaoQiQiaoSwift
//
//  Created by tech-lab on 2016/11/28.
//  Copyright © 2016年 校企桥. All rights reserved.
//

import UIKit

class XQHomeSecondTableViewCell: UITableViewCell {

    var titleLabel:UILabel!;
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        InitUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func InitUI() {
        
        let label1 = UILabel.init(frame: CGRect.zero)
        label1.textColor = UIColor.red
        label1.text = "今日头条"
        self.contentView.addSubview(label1)
        
        titleLabel = UILabel.init(frame: CGRect.zero)
        titleLabel.font = UIFont.systemFont(ofSize: 12)
        self.contentView.addSubview(titleLabel)
        
        label1.snp.makeConstraints { (make) in
            make.left.equalTo(self.contentView.snp.left).offset(15)
            make.centerY.equalTo(self.contentView.snp.centerY)
        }
        
        titleLabel.snp.makeConstraints { (make) in
            make.left.equalTo(label1.snp.right).offset(5)
            make.centerY.equalTo(self.contentView.snp.centerY)
        }
        
    }
    
    
}
